<template>
  <div>
    <h1>About View</h1>
    <p>This is the about view.</p>
    <p>Count: {{ count }}</p>
    <button @click="increment">Increment</button>
    <button @click="reset">Reset</button>
    <button @click="toLogin">跳转登录页面</button>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()

const count = ref(0)
const msg = ref('值')

function increment() {
  count.value++
}
function reset() {
  count.value = 0
}
// 跳转页面
function toLogin() {
  console.log('跳转登录页面')
  router.push({path:'/login'})
}
</script>

<style scoped>
h1 {
  color: red;
}
button {
  margin-right: 10px;
}

</style>
